home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / gzip 1.2.2 / vms / gzip.hlp next >
Encoding:
Text File  |  1993-06-22  |  12.3 KB  |  277 lines  |  [TEXT/MPS ]

  1. 1 GZIP
  2. NAME
  3.      gzip, gunzip, zcat - compress or expand files
  4.  
  5. SYNOPSIS
  6.      gzip [ -acdfhlLnrtvV19 ] [-S suffix] [ name ... ]
  7.      gunzip [ -acfhlLnrtvV ] [-S suffix] [ name ... ]
  8.      zcat [ -fhLV ] [ name ... ]
  9.  
  10. 2 DESCRIPTION
  11.      Gzip reduces the size of the named  files  using  Lempel-Ziv
  12.      coding  (LZ77).  Whenever possible, each file is replaced by
  13.      one with the extension .gz, while keeping the same ownership
  14.      modes,  access  and modification times.  (The default exten-
  15.      sion is -gz for VMS, z for MSDOS, OS/2 FAT and Atari.) If no
  16.      files are specified, the standard input is compressed to the
  17.      standard output.  Gzip will only attempt to compress regular
  18.      files.
  19.  
  20.      If the new file name is too long for its file  system,  gzip
  21.      truncates  it  and  keeps  the  original  file  name  in the
  22.      compressed file.  Gzip attempts to truncate only  the  parts
  23.      of  the file name longer than 3 characters.  (A part is del-
  24.      imited by dots.) If the name consists of small  parts  only,
  25.      the  longest parts are truncated. For example, if file names
  26.      are limited to 14 characters, gzip.msdos.exe  is  compressed
  27.      to gzi.msd.exe.gz.  Names are not truncated on systems which
  28.      do not have a limit on file name length.
  29.  
  30.      Compressed files can be  restored  to  their  original  form
  31.      using  gzip -d or gunzip or zcat. If the original name saved
  32.      in the compressed file is not suitable for its file  system,
  33.      a  new  name is constructed from the original one to make it
  34.      legal.
  35.  
  36.      gunzip takes a  list  of  files  on  its  command  line  and
  37.      replaces each file whose name ends with .gz, -gz, .z, -z, _z
  38.      or .Z and which begins with the correct magic number with an
  39.      uncompressed  file  without  the original extension.  gunzip
  40.      also recognizes the special  extensions  .tgz  and  .taz  as
  41.      shorthands   for  .tar.gz  and  .tar.Z  respectively.   When
  42.      compressing, gzip  uses  the  .tgz  extension  if  necessary
  43.      instead of truncating a file with a .tar extension.
  44.  
  45.      gunzip can currently decompress files created by gzip,  zip,
  46.      compress,  compress  -H  or pack. The detection of the input
  47.      format is automatic.  When using the first two formats, gun-
  48.      zip  checks  a  32  bit  CRC.  For  pack,  gunzip checks the
  49.      uncompressed length. The standard compress  format  was  not
  50.      designed  to  allow  consistency  checks.  However gunzip is
  51.      sometimes able to detect a bad .Z file. If you get an  error
  52.      when uncompressing a .Z file, do not assume that the .Z file
  53.      is correct simply because the standard uncompress  does  not
  54.      complain.  This generally means that the standard uncompress
  55.      does not check its input, and happily generates garbage out-
  56.      put.   The  SCO  compress -H format (lzh compression method)
  57.      does not include a CRC  but  also  allows  some  consistency
  58.      checks.
  59.  
  60.      Files created by zip can be uncompressed  by  gzip  only  if
  61.      they  have  a  single member compressed with the 'deflation'
  62.      method. This feature is only intended to help conversion  of
  63.      tar.zip  files  to  the  tar.gz format. To extract zip files
  64.      with several members, use unzip instead of gunzip.
  65.  
  66.      zcat is identical to gunzip -c. (On some systems,  zcat  may
  67.      be  installed  as  gzcat  to  preserve  the original link to
  68.      compress.) zcat uncompresses either a list of files  on  the
  69.      command   line   or   its  standard  input  and  writes  the
  70.      uncompressed data on standard output.  zcat will  uncompress
  71.      files that have the correct magic number whether they have a
  72.      .gz suffix or not.
  73.  
  74.      Gzip uses the Lempel-Ziv algorithm used in  zip  and  PKZIP.
  75.      The  amount  of  compression obtained depends on the size of
  76.      the input and the distribution of common substrings.   Typi-
  77.      cally,  text  such  as  source code or English is reduced by
  78.      60-70%.  Compression is  generally  much  better  than  that
  79.      achieved  by  LZW  (as used in compress), Huffman coding (as
  80.      used in pack), or adaptive Huffman coding (compact).
  81.  
  82.      Compression is always performed, even if the compressed file
  83.      is  slightly larger than the original. The worst case expan-
  84.      sion is a few bytes for the gzip file header, plus  5  bytes
  85.      every  32K  block, or an expansion ratio of 0.015% for large
  86.      files. Note that the  actual  number  of  used  disk  blocks
  87.      almost  never increases.  gzip preserves the mode, ownership
  88.      and timestamps of files when compressing or decompressing.
  89.  
  90. 2 OPTIONS
  91.      -a --ascii
  92.           Ascii text mode: convert end-of-lines using local  con-
  93.           ventions.  This  option  is supported only on some non-
  94.           Unix systems. For MSDOS, CR LF is converted to LF  when
  95.           compressing,   and  LF  is  converted  to  CR  LF  when
  96.           decompressing.
  97.  
  98.      -c --stdout --to-stdout
  99.           Write output on standard output;  keep  original  files
  100.           unchanged.   If there are several input files, the out-
  101.           put consists of a sequence of independently  compressed
  102.           members.  To obtain better compression, concatenate all
  103.           input files before compressing them.
  104.  
  105.      -d --decompress --uncompress
  106.           Decompress.
  107.  
  108.      -f --force
  109.           Force compression or decompression even if the file has
  110.           multiple   links  or  the  corresponding  file  already
  111.           exists, or if the compressed data is read from or writ-
  112.           ten to a terminal. If the input data is not in a format
  113.           recognized by gzip, and if the option --stdout is  also
  114.           given,  copy the input data without change to the stan-
  115.           dard ouput: let zcat behave as cat. If -f is not given,
  116.           and when not running in the background, gzip prompts to
  117.           verify whether an existing file should be overwritten.
  118.  
  119.      -h --help
  120.           Display a help screen and quit.
  121.  
  122.      -l --list
  123.           For each compressed file, list the following fields:
  124.  
  125.               compressed size: size of the compressed file
  126.               uncompressed size: size of the uncompressed file
  127.               ratio: compression ratio (0.0% if unknown)
  128.               uncompressed_name: name of the uncompressed file
  129.  
  130.           The uncompressed size is given as -1 on VMS because it
  131.       it is not possible to seek reliably to the end of the
  132.           compressed file, where this size is stored.
  133.  
  134.           In combination with the --verbose option, the following
  135.           fields are also displayed:
  136.  
  137.               method: compression method (deflate,compress,lzh,pack)
  138.               crc: the 32-bit CRC of the uncompressed data
  139.               date & time: time stamp for the uncompressed file
  140.  
  141.           The crc is given as ffffffff on VMS for the reason given
  142.           above about the uncompressed size.
  143.  
  144.       With --quiet, the title line is not displayed.
  145.  
  146.      -L --license
  147.           Display the gzip license and quit.
  148.  
  149.      -n --no-name
  150.           When compressing, do not save the original file name by
  151.           default. (The original name is always saved if the name
  152.           had  to  be  truncated.)  When  decompressing,  do  not
  153.           restore  the original file name if present: remove only
  154.           the gzip suffix from the compressed file name.
  155.  
  156.      -q --quiet
  157.           Suppress all warnings.
  158.  
  159.      -r --recurse
  160.           Travel the directory structure recursively. If  any  of
  161.           the file names specified on the command line are direc-
  162.           tories,  gzip  will  descend  into  the  directory  and
  163.           compress  all  the  files it finds there (or decompress
  164.           them in the case of gunzip ).
  165.  
  166.      -S suf --suffix suf
  167.           Use suffix suf instead  of  -gz.   Any  suffix  can  be
  168.           given,  but  suffixes  other  than -z and -gz should be
  169.           avoided to avoid confusion when files  are  transferred
  170.           to   other.   A  null  suffix  forces  gunzip  to   try
  171.           decompression on all given files regardless of  suffix,
  172.           as in:
  173.  
  174.               gunzip -S "" *.*
  175.  
  176.           Previous versions of gzip used the -z suffix. This  was
  177.           changed to avoid a conflict with pack on Unix.
  178.  
  179.      -t --test
  180.           Test. Check the compressed file integrity.
  181.  
  182.      -v --verbose
  183.           Verbose. Display the name and percentage reduction  for
  184.           each file compressed or decompressed.
  185.  
  186.      -V --version
  187.           Version. Display the  version  number  and  compilation
  188.           options then quit.
  189.  
  190.      -# --fast --best
  191.           Regulate the speed of compression using  the  specified
  192.           digit  #,  where  -1  or  --fast  indicates the fastest
  193.           compression method (less compression) and -9 or  --best
  194.           indicates   the  slowest  compression  method  (optimal
  195.           compression).  The  default  compression  level  is  -6
  196.           (that is, biased towards high compression at expense of
  197.           speed).
  198.  
  199. 2 ENVIRONMENT
  200.      The environment variable GZIP_OPT can hold a set of  default
  201.      options  for  gzip.  These options are interpreted first and
  202.      can be overwritten by explicit command line  parameters. For
  203.      example:
  204.            GZIP_OPT == "-8 -v"
  205.  
  206. 2 SEE ALSO
  207.      compress, zip, unzip
  208.  
  209. 2 DIAGNOSTICS
  210.      Exit status is normally 0; if an error occurs,  exit  status
  211.      is 1. If a warning occurs, exit status is 2.
  212.  
  213.      Usage: gzip [-cdfhlLnrtvV19] [-S suffix] [file ...]
  214.              Invalid options were specified on the command line.
  215.      file: not in gzip format
  216.              The  file  specified  to   gunzip   has   not   been
  217.              compressed.
  218.      file: Corrupt input. Use zcat to recover some data.
  219.              The compressed file has been damaged. The data up to
  220.              the point of failure can be recovered using
  221.                    define /user sys$output file.recover
  222.                    zcat file
  223.      file: compressed with xx bits, can only handle yy bits
  224.              File was compressed (using LZW) by  a  program  that
  225.              could  deal  with more bits than the decompress code
  226.              on this machine.  Recompress  the  file  with  gzip,
  227.              which compresses better and uses less memory.
  228.      file: already has -gz suffix -- no change
  229.              The  file  is  assumed  to  be  already  compressed.
  230.              Rename the file and try again.
  231.      file already exists; do you wish to overwrite (y or n)?
  232.              Respond "y" if  you  want  the  output  file  to  be
  233.              replaced; "n" if not.
  234.      gunzip: corrupt input
  235.              A SIGSEGV violation was detected which usually means
  236.              that the input file has been corrupted.
  237.      xx.x%
  238.              Percentage  of  the  input  saved  by   compression.
  239.              (Relevant only for -v and -l.)
  240.      -- not a regular file or directory: ignored
  241.              When the input file is not a regular file or  direc-
  242.              tory, it is left unaltered.
  243.  
  244. 2 CAVEATS
  245.      On VMS:
  246.      - upper case options need quotes: gzip "-V".
  247.      - restoration of timestamps and version numbers is not supported
  248.      - If a compressed file already exists, gzip -f overwrites it, it
  249.        does not create a new version.
  250.      - multi-part gzip files are not supported.
  251.      - gunzip does not preserve the input file format. You can use a
  252.        separate utility to restore the original format.
  253.      - gunzip and zcat can be used only if you have created the
  254.        links to gzip as documented in makegzip.com.  Otherwise
  255.        you must use explicit parameters ("gzip -c" or "gzip -dc").
  256.      - gzip --list cannot give the uncompressed size and crc.
  257.  
  258.      When writing compressed data to  a  tape,  it  is  generally
  259.      necessary  to pad the output with zeroes up to a block boun-
  260.      dary. When the data is read and the whole block is passed to
  261.      gunzip for decompression, gunzip detects that there is extra
  262.      trailing garbage after the compressed data and emits a warn-
  263.      ing  by  default.  You  have  to  use  the --quiet option to
  264.      suppress the warning. This option can be  set  in  the  GZIP
  265.      environment variable as in:
  266.          GZIP == "-q"
  267.          tar xfz /dev/rmt/datn
  268.  
  269.      In the above example, gzip is invoked implicitly by  the  -z
  270.      option  of  GNU  tar. Make sure that the same block size (-b
  271.      option of tar) is used for reading  and  writing  compressed
  272.      data on tapes.
  273.  
  274. 2 BUGS
  275.      On VMS, files in VFC record format are not correctly handled by
  276.      the C runtime library (the linefeed character is suppressed).
  277.